package com.gf.framework.rpcdemo.server.controller;

import com.gf.framework.common.result.R;
import com.gf.framework.rpcdemo.api.feign.IApi;
import com.gf.framework.rpcdemo.api.model.RequestModel;
import com.gf.framework.rpcdemo.api.model.ResponseModel;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author gaofei
 * @date 2022/5/25 20:50
 */
@RestController
@Api(tags = "demo")
@Slf4j
public class FeignDemoController implements IApi {
    @Override
    public R<String> hello() {
        return R.success("来自demo-server的hello world");
    }

    @Override
    public R<ResponseModel> posttest(RequestModel requestModel) {
        return R.success(new ResponseModel(requestModel.getId()));
    }
}
